function [U,y] = egauss(A,b)

	a = [A,b];
	c = columns(a);
	f = rows(a);

	for k = 1:c-1
		a(k,:) /= a(k,k);
		for j = k + 1:f
			a(j,:) -= a(k,:)*a(j,k);
		end
	end 
		
	U = a(:,[1:c-1]);
	y = a(:,c);
		 
end

